#!/usr/bin/env python
# -*- coding: utf-8 -*-

from git import Repo

class  mx_git_project:
	'对应公司每个git库的参数'
	__path=''
	__name=''
	__branch=''
	__revision=''
	__pre_revision=''
	__repo = 0
 
	def __init__(self ,path , name ,branch ,revision , pre_revision):
		self.__path = path
		self.__name = name
		self.__branch = branch
		self.__revision = revision
		self.__pre_revision = pre_revision


	def generate_repo(self , root_path):
		self.__repo = Repo(root_path+'/'+ self.__path)
		pass

	def set_path(self , path):
		self.__path = path

	def set_name(self , name):
		self.__name = name

	def set_branch(self , branch):
		self.__branch = branch

	def set_revision(self , revision):
		self.__revision = revision

	def set_pre_revision(self , pre_revision):
		self.__pre_revision = pre_revision

	def get_path(self ):
		return self.__path

	def get_name(self ):
		return self.__name

	def get_branch(self ):
		return self.__branch

	def get_revision(self):
		return self.__revision

	def get_pre_revision(self ):
		return self.__pre_revision

	def get_repo(self):
		return self.__repo
